Light-emitting diode (LED) technology has advanced to the point where LEDs can be used as energy efficient replacements for conventional incandescent and/or fluorescent light sources. One application where LEDs have been employed is in ambient lighting systems using white and/or color (e.g., red, green and blue) LEDs. Like incandescent and fluorescent light sources, the average intensity of an LED's output is controlled by the average current through the device. Unlike incandescent and fluorescent light sources, however, LEDs can be switched on and off almost instantaneously. As a result, their intensity can be controlled by switching circuits that switch the device current between two current states to achieve a desired average current corresponding to a desired intensity. This approach can also be used to control the relative intensities of red, green and blue (RGB) LED sources (or any other set of primary colors) in ambient lighting systems that mix primary colors in different ratios to achieve a desired color.
One approach to LED switching is described in U.S. Pat. Nos. 6,016,038 and 6,150,774 of Meuller et al. These patents describe the control of different LEDs with square waves of uniform frequency but independent duty cycles, where the square wave frequency is uniform and the different duty cycles represent variations in the width of the square wave pulses. The Meuller patents describe this as pulse width modulation (PWM).
FIG. 1 illustrates a conventional PWM controller driving a current source that supplies current to an LED. The PWM controller includes an n-bit linear counter, an n-bit duty cycle register and a comparator that compares the outputs of the counter and the duty cycle register. The n-bit counter is clocked by a clock signal fclock that causes the counter to count linearly from 0 to 2n−1, rolling over to 0 after reaching 2n−1. The value in the duty cycle register determines the duty cycle of the PWM controller, with the value “0” representing a 0 percent duty cycle and the value “2n−1” representing a 100 percent duty cycle. When the output of the counter is less than the value in the duty cycle register, the output of the comparator is high. When the output of the counter is greater than or equal to the value in the duty cycle register, the output of the comparator is low.
FIG. 2A illustrates the relationship between the output of the n-bit counter and the value in the duty cycle register for the case of n=4 and a value of 7 (binary 0111) in the duty cycle register. Over one period, the linear counter counts from 0 to 15 (binary 1111). While the counter counts from 0 to 6, the comparator output is high (shown as a value of ‘1’ in FIG. 2B). When the count of the linear counter reaches the register value (7), the PWM output goes low (shown as a value of ‘0’ as in FIG. 2B) and stays low until the linear counter rolls over to zero at the end of the period. As a result, the PWM controller produces a timing waveform with a single transition from high to low, and therefore a single pulse during each period.
As illustrated in FIG. 2C, for n=8 and fclock=1 MHz, the spectral content of this output includes a fixed fundamental frequency of fOUT=fclock/2n=4 KHz and odd harmonics at 3fOUT=12 KHz, 5fOUT=20 KHz, etc., which can cause electromagnetic interference (EMI) to sensitive devices, components, circuits and systems nearby. When multiple light sources are used for color mixing, with their intensities controlled with pulse width modulation, the EMI will be multiplied because all of the light sources will be modulated at the same uniform frequency, independent of duty cycle.